package com.terry.bootdemo.api.configutation;

import com.terry.bootdemo.api.interceptor.JwtTokenIntercepetor;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
@ComponentScan(useDefaultFilters = true)
public class JwtConfigurition extends WebMvcConfigurerAdapter {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new JwtTokenIntercepetor()).addPathPatterns("/api/getApi");
    }
}
